﻿using AntDesign;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace YwhWeb.Pages.Daily
{
    public partial class Notice
    {
        public YwhLib.QueryRsp<YwhLib.Notice> noticeRsp = new YwhLib.QueryRsp<YwhLib.Notice>();

        IEnumerable<YwhLib.Notice> selectedRows;
        ITable table;

        int _pageIndex = 1;
        int _pageSize = 10;
        int _total = 0;

        public async Task OnChange(AntDesign.TableModels.QueryModel<YwhLib.Notice> queryModel)
        {
            //Console.WriteLine(JsonSerializer.Serialize(queryModel));
        }

        public void RemoveSelection(int id)
        {
            //var selected = selectedRows.Where(x => x.Id != id);
            //selectedRows = selected;
        }

        private void Delete(int id)
        {

        }

        bool drawerVisible = false;

        void NewDrawer()
        {
            this.drawerVisible = true;
        }

        private YwhLib.Notice editNotice = new YwhLib.Notice();
        List<string> options = new List<string>()
        {
            "Beijing","Shanghai","Guangzhou","Shenzhen","Chongqing","Wuhan"
        };

        void OnSelectionChange(AutoCompleteOption item)
        {
            //selectItem = item;
        }

        private DatePickerDisabledTime GetDisabledTime(DateTime date)
        {
            int[] timeRange = new int[60];
            for (int i = 0; i < timeRange.Length; i++)
            {
                timeRange[i] = i;
            }

            return new DatePickerDisabledTime(timeRange[4..15], timeRange[20..55], timeRange[3..19]);
        }
    }
}
